From: Richard M. Stallman Date: Tue, 8 Jun 1993 04:41:00 +0000 (+0000) Subject: (Info-follow-reference): Fix completion defaulting. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~95495 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=b0ebdfe55170d996adf13a5408dd8cec2798ade3;p=emacs.git (Info-follow-reference): Fix completion defaulting. --- diff --git a/lisp/info.el b/lisp/info.el index 043a4402ce0..1aec6acc629 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -661,11 +661,13 @@ NAME may be an abbreviation of the reference name." (cons (cons str nil) completions)))) (if completions - (list (completing-read (if default - (concat "Follow reference named: (" - default ") ") - "Follow reference named: ") - completions default t)) + (let ((input (completing-read (if default + (concat "Follow reference named: (" + default ") ") + "Follow reference named: ") + completions nil t))) + (list (if (equal input "") + default input))) (error "No cross-references in this node")))) (let (target beg i (str (concat "\\*note " footnotename))) (while (setq i (string-match " " str i))